package com.example.sb.config;

import com.example.sb.interceptor.MyInterceptor;
import com.example.sb.interceptor.MyInterceptor2;
import com.example.sb.interceptor.MyInterceptor3;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author kedong.lin
 */
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new MyInterceptor())
                .addPathPatterns("/intercept/*");
        registry.addInterceptor(new MyInterceptor2())
                .addPathPatterns("/intercept/*");
        registry.addInterceptor(new MyInterceptor3())
                .addPathPatterns("/intercept/*");
    }
}
